import axios from '@/libs/api.request'

export const getOrganizationList = (seachParams) => {
  return axios.request({
    url: 'organization',
    method: 'get',
    params: seachParams
  })
};

export const getCurrentOrganization = (id) => {
  return axios.request({
    url: 'organization/' + id,
    method: 'get'
  })
};

export const getOrganization = (id) => {
  return axios.request({
    url: 'organization/' + id,
    method: 'get'
  })
}

export const addOrganization = (data) => {
  return axios.request({
    url: 'organization',
    method: 'post',
    data: data
  })
};

export const updateOrganization = (id, data) => {
  return axios.request({
    url: 'organization/' + id,
    method: 'put',
    data: data
  })
};

export const deleteOrganization = (id) => {
  return axios.request({
    url: 'organization/' + id,
    method: 'delete'
  })
};
